Misc boring code cleanups. There shouldn't be visible changes here.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 11 Mar 2004 15:07:45 +0000 (15:07 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 11 Mar 2004 15:07:45 +0000 (15:07 +0000)
gpsbabel/Makefile
gpsbabel/defs.h
gpsbabel/garmin.c
gpsbabel/gpx.c
gpsbabel/pcx.c
gpsbabel/smplrout.c
gpsbabel/tpg.c
gpsbabel/util.c
gpsbabel/vecs.c

index ab21c9151a0f6bc691f546dbcf06afe6b8117604..26e9ecdaee95dd1489fe441745f8314f2d328805 100644 (file)
@@ -78,8 +78,8 @@ dep:
        (echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > $@ || (rm -f $@ ; exit 1)' ) >> /tmp/dep
        echo Edit Makefile and bring in /tmp/dep
 
-VERSIONU=1_2_2_beta02222004
-VERSIOND=1.2.2_beta02222004
+VERSIONU=1_2_2_beta03112004
+VERSIOND=1.2.2_beta03112004
 #VERSIONU=1_2_1
 #VERSIOND=1.2.1
 
index c78a7b56eb83f852488737fd9fef01384fcf6225..ffedceb688934eb486b1777e950ec412cb5c44d7 100644 (file)
@@ -243,11 +243,13 @@ void route_del_wpt(route_head *rte, waypoint *wpt);
 void route_add_head(route_head *rte);
 void track_add_head(route_head *rte);
 void route_disp_all(route_hdr, route_trl, waypt_cb);
+void track_disp_all(route_hdr, route_trl, waypt_cb);
 void route_free (route_head *);
 void route_flush( queue *);
 void route_flush_all(void);
 unsigned int route_waypt_count(void);
 unsigned int route_count(void);
+unsigned int track_count(void);
 
 /*
  * All shortname functions take a shortname handle as the first arg.
@@ -403,6 +405,7 @@ int case_ignore_strcmp(const char *s1, const char *s2);
 char *strsub(char *s, char *search, char *replace);
 void rtrim(char *s);
 signed int get_tz_offset(void);
+signed int month_lookup(const char *m);
 const char *get_cache_icon(const waypoint *waypointp);
 char * xml_entitize(const char * str);
 char * strip_html(const utf_string*);
index 34babd697030e70d30a4ad8e711bf1d0ce0f6196..e8b32bdf9a2a10fe61827378a04aba2e1632d88e 100644 (file)
@@ -258,7 +258,7 @@ route_read(void)
 
        nroutepts = GPS_Command_Get_Route(portname, &array);
 
-       fprintf(stderr, "Routes %d\n", nroutepts);
+       fprintf(stderr, "Routes %d\n", (int) nroutepts);
 #if 1
        for (i = 0; i < nroutepts; i++) {
                route_head *rte_head;
index f71bd0a702f1196bac68b4a7d5a6225d672d10f0..144c418259d1619ddd32af073b24ec5855f9ea5e 100644 (file)
@@ -435,6 +435,8 @@ gpx_start(void *data, const char *el, const char **attr)
        case tt_cache_desc_short:
                tag_cache_desc(attr);
                break;
+       default:
+               break;
        }
        if (passthrough) {
                start_something_else(el, attr);
@@ -711,6 +713,8 @@ gpx_end(void *data, const char *el)
                end_something_else();
                *s = 0;
                return;
+       default:
+               break;
        }
 
        if (passthrough)
@@ -1087,8 +1091,6 @@ gpx_waypt_pr(const waypoint *waypointp)
 static void
 gpx_track_hdr(const route_head *rte)
 {
-       char * tmp_ent;
-       
        fprintf(ofd, "<trk>\n");
        write_optional_xml_entity(ofd, "  ", "name", rte->rte_name);
        write_optional_xml_entity(ofd, "  ", "desc", rte->rte_desc);
@@ -1130,8 +1132,6 @@ void gpx_track_pr()
 static void
 gpx_route_hdr(const route_head *rte)
 {
-       char * tmp_ent;
-       
        fprintf(ofd, "<rte>\n");
        write_optional_xml_entity(ofd, "  ", "name", rte->rte_name);
        write_optional_xml_entity(ofd, "  ", "desc", rte->rte_desc);
index 5d2000e9c84f1fe298864872f8c8ff1ba1f49e8f..07b4d95669d7d10ccde8d7d9a5d7fe0cddfbaacf 100644 (file)
@@ -76,7 +76,7 @@ data_read(void)
        waypoint *wpt_tmp;
        char ibuf[122];
        struct tm tm;
-       route_head *track_head;
+       route_head *track_head = NULL;
 
        for(;fgets(ibuf, sizeof(ibuf), file_in);) {
                switch (ibuf[0]) {
index 401317798cfb6456dea7f9b5e4050866b5df7950..ee24fa3f7888e2e48b6da9ffca21caa9161b0518 100644 (file)
@@ -223,8 +223,6 @@ routesimple_process( void )
 
 void
 routesimple_init(const char *args) {
-       char *fm;
-
        count = 0;
 
        if (countopt) {
index d62a436471941ab5db88fd71b23fa05493e3461f..d9eb11c7c5d00a364865a3e05ebb1332f18b1186 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "defs.h"
+#include <string.h>
 #include "jeeps/gpsmath.h" /* for datum conversions */
 
 #define MYNAME "TPG"
index a50d9825d52718deac3561d27155d6e66c39c882..4df42e8872e5980b7a80b2f0ac06d63d4c597fed 100644 (file)
@@ -449,6 +449,9 @@ get_tz_offset(void)
        }
 }
 
+/*
+ * Return the (zero based) month number of the year or -1 for failure.
+ */
 signed int
 month_lookup(const char *m)
 {
index 304dda9084ce5db680284dfb8ea940458118739b..46a1fa714d51e41493bfe162163690afefa37999 100644 (file)
@@ -415,6 +415,7 @@ disp_vecs(void)
  * Additional information for V1.
  * Output format type at front of line.
  */
+static void
 disp_v1(ff_type t)
 {
        char *tstring;